<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            margin: 50px auto;
            padding: 0;
            width: 800px;
            height: 600px;
            border-radius: 5px;
            overflow: hidden;
            position: relative;
        }

        .box > div {
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
        }

        .box .front {
            background: radial-gradient(circle at -10000px -10000px, transparent, white, white, white);
        }
    </style>
</head>
<body>
<div class="box">
    <div class="img">
        <img src="image/ald.jpg" alt="">
    </div>
    <div class="front"></div>
</div>
</body>
<script>
    window.onload = function () {
        let box = document.querySelector('.box');
        let front = document.querySelector('.box .front');
        front.onmousemove = function (e) {
            let x = e.pageX - box.offsetLeft;
            let y = e.pageY - box.offsetTop;
            this.style.background = "radial-gradient(circle at " + x + "px " + y + "px, transparent, white, white, white)";
        };
        front.onmouseout = function () {
            this.style.background = "radial-gradient(circle at -10000px -10000px, transparent, white, white, white)";
        }
    }
</script>
</html>